//
//  LeftDrawTableViewCell.m
//  ZhihunewPaper
//
//  Created by 梅杰 on 16/7/8.
//  Copyright © 2016年 梅杰. All rights reserved.
//

#import "LeftDrawTableViewCell.h"

@implementation LeftDrawTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    [self initWeight];
    self.backgroundColor = [UIColor clearColor];
    return self;
}
- (void)initWeight {
    UIButton *labelButton = [[UIButton alloc] init];
    self.conLableButton = labelButton;
    [self.contentView addSubview:labelButton];
    __weak typeof(self) __wakeme = self;
    [labelButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(__wakeme.contentView).offset(10);
        make.width.equalTo(__wakeme.mas_width).multipliedBy(0.7);
        make.top.equalTo(__wakeme.contentView);
        make.bottom.equalTo(__wakeme.contentView);
    }];
    labelButton.backgroundColor = [UIColor clearColor];
    labelButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    labelButton.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
    
//    labelButton.backgroundColor = [UIColor redColor];
    
    UIButton *button = [[UIButton alloc] init];
    self.conButton = button;
    [self.contentView addSubview:button];
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.trailing.equalTo(__wakeme);
        make.leading.equalTo(labelButton.mas_trailing);
        make.height.equalTo(labelButton).offset(-10);
    }];
    button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    [button setImage:[UIImage imageNamed:@"Dark_Menu_Follow"] forState:UIControlStateNormal];
    button.backgroundColor = [UIColor clearColor];
}
@end
